oracle.pgx.config

## Enum PgxConfig.Field

- java.lang.Object
- - java.lang.Enum<PgxConfig.Field>
  - - oracle.pgx.config.PgxConfig.Field

- All Implemented Interfaces:
    Serializable, Comparable<PgxConfig.Field>, ConfigField
  Enclosing class:
    PgxConfig

      public static enum PgxConfig.Field
      extends Enum<PgxConfig.Field>
      implements ConfigField

  Fields of PGX Engine Config

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ALLOW_IDLE_TIMEOUT_OVERWRITE` if `true`, sessions can overwrite default idle timeout
    `ALLOW_TASK_TIMEOUT_OVERWRITE` if `true`, sessions can overwrite default task timeout
    `ARRAY_FACTORY_STRATEGY` `java_arrays` = use normal java arrays only (limited to 32bit in length) `java_2d_arrays` = use Java 2D arrays only (achieve arrays of 64bit in length with the cost of indirection) `off_heap_arrays` = use arrays allocated off-heap (achieve 64bit in length without performance penalty, but with the price of breaking out of the JVM) `dynamic` = decide at run-time which allocation strategy to use based on the requested array length
    `BFS_THRESHOLD_READ_BASED` threshold of BFS traversal level items to switch to read-based visiting strategy
    `BFS_THRESHOLD_SINGLE_THREADED` until what number of BFS traversal level items vertices are visited single-threaded
    `BIG_PARTITION_THRESHOLD` the threshold for partitions to be considered 'big'.
    `CC` (only relevant if native analysis is enabled) C++ compiler executable (either absolute path or resolvable via `$PATH`)
    `CFLAGS` (only relevant if native analysis is enabled) flags for C++ compiler
    `CNI_DIFF_FACTOR_DEFAULT` default diff factor value used in the common neighbor iterator implementations.
    `CNI_SMALL_DEFAULT` default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.
    `CNI_STOP_RECURSION_DEFAULT` default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.
    `DFS_THRESHOLD_LARGE` value that determines at which number of visited vertices the DFS implementation will switch to data-structures that are more optimized for larger numbers of vertices.
    `ENABLE_GM_COMPILER` if `true`, enable dynamic compilation of Green-Marl code during runtime.
    `EXPLICIT_SPIN_LOCKS` `true` means spin explicitly in a loop until lock becomes available.
    `GRAPHS` list of paths to graph configs to be registered at start-up
    `IDLE_SLEEP_DURATION` if engine is idle, duration in milliseconds the dispatcher thread sleeps until checking for new tasks again
    `INVOKEABLE_PROVIDERS` list of invokeable providers to be loaded during startup
    `LARGE_ARRAY_STRATEGY` [relevant for `dynamic` array factory only] array factory strategy to use when requested array size is exceeding `large_array_threshold`
    `LARGE_ARRAY_THRESHOLD` [relevant for `dynamic` array factory only] use `large_array_strategy` when requested array size is exceeding this number.
    `LAUNCH_WATCHDOGS` (for debugging) if `true`, additional watch-dog threads will be launched which monitor and log engine health stats
    `LFLAGS` (only relevant if native analysis is enabled) linker flags for C++ compiler
    `MAX_ACTIVE_SESSIONS` the maximum number of sessions allowed to be active at a time
    `MAX_OFF_HEAP_SIZE` maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown.
    `MAX_QUEUE_SIZE_PER_SESSION` the maximum number of pending tasks allowed to be in the queue, per session.
    `MAX_SNAPSHOT_COUNT` Number of snapshots that may be loaded in the engine at the same time.
    `MEMORY_CLEANUP_INTERVAL` memory cleanup tick in seconds
    `NUM_SPIN_LOCKS` how many spin locks each generated app will create at instantiation.
    `NUM_WORKERS_ANALYSIS` how many worker threads to use for analysis tasks
    `NUM_WORKERS_FAST_TRACK_ANALYSIS` how many worker threads to use for fast-track analysis tasks
    `NUM_WORKERS_IO` how many worker threads to use for I/O tasks (load/refresh/write from/to disk).
    `PARALLELISM` number of worker threads to be used in thread pool.
    `PARALLELIZATION_STRATEGY` which parallelization strategy to use.
    `PATH_TO_GM_COMPILER` if set, use this path to `gm_comp` binary for dynamic compilations.
    `RELEASE_MEMORY_THRESHOLD` threshold percentage of used memory after which the engine starts freeing un-used graphs.
    `SESSION_IDLE_TIMEOUT_SECS` timeout of idling sessions in seconds.
    `SESSION_TASK_TIMEOUT_SECS` timeout to interrupt long-running tasks submitted by sessions (algorithms, I/O tasks) in seconds.
    `SMALL_TASK_LENGTH` task length if total amount of work is small than default task length (only relevant for task-stealing strategies)
    `STRICT_MODE` if `true`, exceptions are thrown and logged with `ERROR` level whenever engine encounters configuration problems, such as invalid keys, mismatches and other potential errors.
    `TASK_LENGTH` default task length (only relevant for task-stealing strategies).
    `THROW_OUT_OF_MEMORY_ERROR_DURING_ALLOCATION` (for debugging) if `true`, engine will throw OutOfMemoryErrors on purpose when trying to allocate large memory chunks.
    `THROW_OUT_OF_MEMORY_ERROR_DURING_LOADING` (for debugging) if `true`, engine will throw OutOfMemoryErrors on purpose when trying to load graphs from disk.
    `THROW_OUT_OF_MEMORY_ERROR_DURING_MUTATION` (for debugging) if `true`, engine will throw OutOfMemoryErrors on purpose when trying to mutate graphs.
    `TMP_DIR` Use this path as temporary directory to store compilation artifacts and other temporary data.
    `UNSAFE_ALLOW_FOREIGN_SYNTAX` Deprecated.
    `UNSAFE_ALLOW_LOCAL_FILESYSTEM` Deprecated.
    `USE_NATIVE_ANALYSIS` execute analyses using Java (`false`) or C++ (`true`) runtime
    `USE_NATIVE_LOADERS` use Java (`false`) or C++ (`true`) graph loader framework
    `USE_STRING_POOL` If `true`, PGX will store string properties in a pool in order to consume less memory on string properties

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `getDefaultVal()` Gets the default value of this field.
    `List<String>` | `getKeyAliases()` Gets the key aliases of this field which are also recognized during parsing.
    `Class<?>` | `getType()` Gets the type of this field.
    `boolean` | `isArray()` Checks if this field is an array.
    `boolean` | `isEnum()` Checks if this field is of enum type.
    `boolean` | `isPath()` Checks if this field is a path.
    `boolean` | `isPrimitive()` Checks if this field is of primitive type.
    `boolean` | `isRequired()` Checks if this field is required.
    `String` | `toKey()` Get the key of this field, which is how this field is represented in serialized form.
    `String` | `toString()`
    `static PgxConfig.Field` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static PgxConfig.Field[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### ALLOW_IDLE_TIMEOUT_OVERWRITE

          public static final PgxConfig.Field ALLOW_IDLE_TIMEOUT_OVERWRITE

      if `true`, sessions can overwrite default idle timeout

    - #### ALLOW_TASK_TIMEOUT_OVERWRITE

          public static final PgxConfig.Field ALLOW_TASK_TIMEOUT_OVERWRITE

      if `true`, sessions can overwrite default task timeout

    - #### ARRAY_FACTORY_STRATEGY

          public static final PgxConfig.Field ARRAY_FACTORY_STRATEGY

      `java_arrays` = use normal java arrays only (limited to 32bit in length)
      `java_2d_arrays` = use Java 2D arrays only (achieve arrays of 64bit in length with the cost of indirection)
      `off_heap_arrays` = use arrays allocated off-heap (achieve 64bit in length without performance penalty, but with the price of breaking out of the JVM)
      `dynamic` = decide at run-time which allocation strategy to use based on the requested array length

    - #### BFS_THRESHOLD_READ_BASED

          public static final PgxConfig.Field BFS_THRESHOLD_READ_BASED

      threshold of BFS traversal level items to switch to read-based visiting strategy

    - #### BFS_THRESHOLD_SINGLE_THREADED

          public static final PgxConfig.Field BFS_THRESHOLD_SINGLE_THREADED

      until what number of BFS traversal level items vertices are visited single-threaded

    - #### BIG_PARTITION_THRESHOLD

          public static final PgxConfig.Field BIG_PARTITION_THRESHOLD

      the threshold for partitions to be considered 'big'. If a partition contains more vertices than specified in this threshold, PGX will use special, read-only vertex set implementation to hold the vertices which trades memory for speed. Advantage of big partitions: 1) almost no additional memory needed to hold the vertices 2) creation time of partition results is a lot faster. Disadvantages of big partitions: 1) read-only (adding vertices to a big partition will result in an exception) 2) retrieving the vertices (iteration over a big partiton) is slightly slower.

    - #### CC

          public static final PgxConfig.Field CC

      (only relevant if native analysis is enabled) C++ compiler executable (either absolute path or resolvable via `$PATH`)

    - #### CFLAGS

          public static final PgxConfig.Field CFLAGS

      (only relevant if native analysis is enabled) flags for C++ compiler

    - #### CNI_DIFF_FACTOR_DEFAULT

          public static final PgxConfig.Field CNI_DIFF_FACTOR_DEFAULT

      default diff factor value used in the common neighbor iterator implementations.

    - #### CNI_SMALL_DEFAULT

          public static final PgxConfig.Field CNI_SMALL_DEFAULT

      default value used in the common neighbor iterator implementations, to indicate below which threshold a subarray is considered small.

    - #### CNI_STOP_RECURSION_DEFAULT

          public static final PgxConfig.Field CNI_STOP_RECURSION_DEFAULT

      default value used in the common neighbor iterator implementations, to indicate the minimum size where the binary search approach is applied.

    - #### DFS_THRESHOLD_LARGE

          public static final PgxConfig.Field DFS_THRESHOLD_LARGE

      value that determines at which number of visited vertices the DFS implementation will switch to data-structures that are more optimized for larger numbers of vertices.

    - #### ENABLE_GM_COMPILER

          public static final PgxConfig.Field ENABLE_GM_COMPILER

      if `true`, enable dynamic compilation of Green-Marl code during runtime. Note: the built-in Green-Marl compilers don't support all platforms. Find the list of supported platforms in the installation section. You can also use your own version of the compiler by setting the `path_to_gm_compiler` field.

    - #### EXPLICIT_SPIN_LOCKS

          public static final PgxConfig.Field EXPLICIT_SPIN_LOCKS

      `true` means spin explicitly in a loop until lock becomes available. `false` means using JDK locks which rely on the JVM to decide whether to context switch or spin. Our experiments showed that setting this value to `true` results in better performance.

    - #### GRAPHS

          public static final PgxConfig.Field GRAPHS

      list of paths to graph configs to be registered at start-up

    - #### IDLE_SLEEP_DURATION

          public static final PgxConfig.Field IDLE_SLEEP_DURATION

      if engine is idle, duration in milliseconds the dispatcher thread sleeps until checking for new tasks again

    - #### INVOKEABLE_PROVIDERS

          public static final PgxConfig.Field INVOKEABLE_PROVIDERS

      list of invokeable providers to be loaded during startup

    - #### LARGE_ARRAY_STRATEGY

          public static final PgxConfig.Field LARGE_ARRAY_STRATEGY

      [relevant for `dynamic` array factory only] array factory strategy to use when requested array size is exceeding `large_array_threshold`

    - #### LARGE_ARRAY_THRESHOLD

          public static final PgxConfig.Field LARGE_ARRAY_THRESHOLD

      [relevant for `dynamic` array factory only] use `large_array_strategy` when requested array size is exceeding this number. (defaults to `Integer.MAX_VALUE - 3`)

    - #### LAUNCH_WATCHDOGS

          public static final PgxConfig.Field LAUNCH_WATCHDOGS

      (for debugging) if `true`, additional watch-dog threads will be launched which monitor and log engine health stats

    - #### LFLAGS

          public static final PgxConfig.Field LFLAGS

      (only relevant if native analysis is enabled) linker flags for C++ compiler

    - #### MAX_ACTIVE_SESSIONS

          public static final PgxConfig.Field MAX_ACTIVE_SESSIONS

      the maximum number of sessions allowed to be active at a time

    - #### MAX_OFF_HEAP_SIZE

          public static final PgxConfig.Field MAX_OFF_HEAP_SIZE

      maximum amount of off-heap memory PGX is allowed to allocate in megabytes, before an OutOfMemoryError will be thrown. Note: this limit is not guaranteed to never be exceeded because of rounding and synchronization trade-offs. It only serves as threshold when PGX starts to reject new memory allocation requests.

    - #### MAX_QUEUE_SIZE_PER_SESSION

          public static final PgxConfig.Field MAX_QUEUE_SIZE_PER_SESSION

      the maximum number of pending tasks allowed to be in the queue, per session. If a session reaches the maximum, new incoming requests of that sesssion get rejected. A negative value means infinity / unlimited.

    - #### MAX_SNAPSHOT_COUNT

          public static final PgxConfig.Field MAX_SNAPSHOT_COUNT

      Number of snapshots that may be loaded in the engine at the same time. New snapshots can be created via auto or forced update. If the number of snapshots of a graph reaches this threshold, no more auto-updates will be performed and a forced-updated will result in an exception until one or more snapshots are removed from memory. A value of zero indicates to support an unlimited amount of snapshots.

    - #### MEMORY_CLEANUP_INTERVAL

          public static final PgxConfig.Field MEMORY_CLEANUP_INTERVAL

      memory cleanup tick in seconds

    - #### NUM_SPIN_LOCKS

          public static final PgxConfig.Field NUM_SPIN_LOCKS

      how many spin locks each generated app will create at instantiation. Trade-off: small number implies less memory consumption. Big number implies faster execution (if algorithm uses spin locks)

    - #### NUM_WORKERS_ANALYSIS

          public static final PgxConfig.Field NUM_WORKERS_ANALYSIS

      how many worker threads to use for analysis tasks

    - #### NUM_WORKERS_FAST_TRACK_ANALYSIS

          public static final PgxConfig.Field NUM_WORKERS_FAST_TRACK_ANALYSIS

      how many worker threads to use for fast-track analysis tasks

    - #### NUM_WORKERS_IO

          public static final PgxConfig.Field NUM_WORKERS_IO

      how many worker threads to use for I/O tasks (load/refresh/write from/to disk). This value won't affect file-based loaders, as they're always single-threaded. Database loaders will open a new connection for each I/O worker.

    - #### PARALLELISM

          public static final PgxConfig.Field PARALLELISM

      number of worker threads to be used in thread pool. Note: if caller thread is part of another thread-pool, this value is ignored and parallelism of parent pool is used.

    - #### PARALLELIZATION_STRATEGY

          public static final PgxConfig.Field PARALLELIZATION_STRATEGY

      which parallelization strategy to use.
      `segmented` = split work into segments, use 1 thread per segment
      `task_stealing` = F/J pool using recursive actions
      `task_stealing_counted` = F/J pool using counted completers to reduce joins

    - #### PATH_TO_GM_COMPILER

          public static final PgxConfig.Field PATH_TO_GM_COMPILER

      if set, use this path to `gm_comp` binary for dynamic compilations. If not set and `enable_gm_compiler` is `true`, PGX will try to utilize one of the built-in compiler binaries.

    - #### RELEASE_MEMORY_THRESHOLD

          public static final PgxConfig.Field RELEASE_MEMORY_THRESHOLD

      threshold percentage of used memory after which the engine starts freeing un-used graphs. Examples: A value of `0.0` means graphs get freed as soon as their reference count becomes zero. That is, all sessions which loaded that graph were destroyed/timed out. A value of `1.0` means graphs get never freed. Engine will throw `OutOfMemoryError`s as soon as a graph is needed which doesn't fit in memory anymore. A value of `0.7` means the engine keeps all graphs in memory as long as total memory consumption is below 70% of total available memory, even if there is currently no session using them. Once the 70% are surpassed and another graph needs to get loaded, un-used graphs get freed until memory consumption is below 70% again.

    - #### SESSION_IDLE_TIMEOUT_SECS

          public static final PgxConfig.Field SESSION_IDLE_TIMEOUT_SECS

      timeout of idling sessions in seconds. Set to zero for infinity/no timeout

    - #### SESSION_TASK_TIMEOUT_SECS

          public static final PgxConfig.Field SESSION_TASK_TIMEOUT_SECS

      timeout to interrupt long-running tasks submitted by sessions (algorithms, I/O tasks) in seconds. Set to zero for infinity/no timeout

    - #### SMALL_TASK_LENGTH

          public static final PgxConfig.Field SMALL_TASK_LENGTH

      task length if total amount of work is small than default task length (only relevant for task-stealing strategies)

    - #### STRICT_MODE

          public static final PgxConfig.Field STRICT_MODE

      if `true`, exceptions are thrown and logged with `ERROR` level whenever engine encounters configuration problems, such as invalid keys, mismatches and other potential errors. If `false`, engine logs problems with `ERROR`/`WARN` level (depending on severity) and makes best guesses / uses sensible defaults instead of throwing exceptions.

    - #### TASK_LENGTH

          public static final PgxConfig.Field TASK_LENGTH

      default task length (only relevant for task-stealing strategies). F/J pool documentation says this value should be between 100 and 10000. Trade-off: small number implies more fine-grained tasks are generated, higher stealing throughput. High number implies less memory consumption and GC activity

    - #### THROW_OUT_OF_MEMORY_ERROR_DURING_ALLOCATION

          public static final PgxConfig.Field THROW_OUT_OF_MEMORY_ERROR_DURING_ALLOCATION

      (for debugging) if `true`, engine will throw OutOfMemoryErrors on purpose when trying to allocate large memory chunks.

    - #### THROW_OUT_OF_MEMORY_ERROR_DURING_LOADING

          public static final PgxConfig.Field THROW_OUT_OF_MEMORY_ERROR_DURING_LOADING

      (for debugging) if `true`, engine will throw OutOfMemoryErrors on purpose when trying to load graphs from disk.

    - #### THROW_OUT_OF_MEMORY_ERROR_DURING_MUTATION

          public static final PgxConfig.Field THROW_OUT_OF_MEMORY_ERROR_DURING_MUTATION

      (for debugging) if `true`, engine will throw OutOfMemoryErrors on purpose when trying to mutate graphs.

    - #### TMP_DIR

          public static final PgxConfig.Field TMP_DIR

      Use this path as temporary directory to store compilation artifacts and other temporary data. If set to `<system-tmp-dir>`, use standard tmp directory of underlying system (`/tmp` on Linux)

    - #### UNSAFE_ALLOW_FOREIGN_SYNTAX

          @Deprecated
          public static final PgxConfig.Field UNSAFE_ALLOW_FOREIGN_SYNTAX

      Deprecated.
      (This flag reduces security, enable only if you know what you're doing!) Allow foreign syntax in user-provided Green-Marl programs

    - #### UNSAFE_ALLOW_LOCAL_FILESYSTEM

          @Deprecated
          public static final PgxConfig.Field UNSAFE_ALLOW_LOCAL_FILESYSTEM

      Deprecated.
      (This flag reduces security, enable only if you know what you're doing!) Allow loading from local filesystem, if in client/server mode. WARNING: This should only be enabled if you want to explicitly allow users of the PGX remote interface to access files on the local filesystem.

    - #### USE_NATIVE_ANALYSIS

          public static final PgxConfig.Field USE_NATIVE_ANALYSIS

      execute analyses using Java (`false`) or C++ (`true`) runtime

    - #### USE_NATIVE_LOADERS

          public static final PgxConfig.Field USE_NATIVE_LOADERS

      use Java (`false`) or C++ (`true`) graph loader framework

    - #### USE_STRING_POOL

          public static final PgxConfig.Field USE_STRING_POOL

      If `true`, PGX will store string properties in a pool in order to consume less memory on string properties

  - ### Method Detail

    - #### getDefaultVal

          public Object getDefaultVal()

      Description copied from interface: `ConfigField`
      Gets the default value of this field.
      Specified by:
        `getDefaultVal` in interface `ConfigField`
      Returns:
        the default value

    - #### getKeyAliases

          public List<String> getKeyAliases()

      Description copied from interface: `ConfigField`
      Gets the key aliases of this field which are also recognized during parsing.
      Specified by:
        `getKeyAliases` in interface `ConfigField`
      Returns:
        the key aliases

    - #### getType

          public Class<?> getType()

      Description copied from interface: `ConfigField`
      Gets the type of this field.
      Specified by:
        `getType` in interface `ConfigField`
      Returns:
        the type

    - #### isArray

          public boolean isArray()

      Description copied from interface: `ConfigField`
      Checks if this field is an array.
      Specified by:
        `isArray` in interface `ConfigField`
      Returns:
        true, if array

    - #### isEnum

          public boolean isEnum()

      Description copied from interface: `ConfigField`
      Checks if this field is of enum type.
      Specified by:
        `isEnum` in interface `ConfigField`
      Returns:
        true, if enum

    - #### isPath

          public boolean isPath()

      Description copied from interface: `ConfigField`
      Checks if this field is a path.
      Specified by:
        `isPath` in interface `ConfigField`
      Returns:
        true, if path

    - #### isPrimitive

          public boolean isPrimitive()

      Description copied from interface: `ConfigField`
      Checks if this field is of primitive type.
      Specified by:
        `isPrimitive` in interface `ConfigField`
      Returns:
        true, if primitive

    - #### isRequired

          public boolean isRequired()

      Description copied from interface: `ConfigField`
      Checks if this field is required.
      Specified by:
        `isRequired` in interface `ConfigField`
      Returns:
        true, if required

    - #### toKey

          public String toKey()

      Description copied from interface: `ConfigField`
      Get the key of this field, which is how this field is represented in serialized form.
      Specified by:
        `toKey` in interface `ConfigField`
      Returns:
        the key.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Enum<PgxConfig.Field>`

    - #### valueOf

          public static PgxConfig.Field valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### values

          public static PgxConfig.Field[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (PgxConfig.Field c : PgxConfig.Field.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

Copyright © 2015. All rights reserved.